﻿@{
    Layout = null;
    int z = 0;
}
<!DOCTYPE html>
@Html.Partial("LoadPanelPartial")
<html>
<head>
    <title></title>
       @if (false)
       {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
       }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <link href="@Url.Content("~/Content/jquery-ui.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/jquery-ui.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>

    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)
<script>
    $(document).ready(function () {
        $("#toolMenu").smartFloat();
        var hdjsAlert = $("#hdjsAlert").val();
        if (hdjsAlert != "") {
            alert(hdjsAlert);
        }
        if (hdjsAlert == "操作成功") {
            window.location.href = rootPath + '/AllowanceFileManage/';
        }
    });

    function delADD(code) {
        alert($("#hidNSRDZDAH").val());
        var je = $("#" + code + "je").text();
        var jeSUM = $("#jeSUM").text();
        $("#jeSUM").text((jeSUM - je).toFixed(2));
        $("tr[id='" + code + "']").remove();
    }

    function MenuTop_emClick(source, e) {
        switch (e.item.name) {
            case "btnSubmit":
                {
                    Save();
                    break;
                }
            case "btnback":
                {
                    window.location.href = rootPath + '/AllowanceFileManage/';
                    break;
                }
        }

    }



    function Save() {
        form1.submit();
    }
</script>

   <style>
    .tableStyle
{
	width: 100%;
	border: solid 1px black;
		padding: 6px 5px;
	border-collapse: collapse;
}
.tableStyle td
{
}

.tableStyle .tdClass
{
	padding: 0px;
  padding: 6px 5px;
	border: solid 1px black;
}
.tableStyle th
{
	text-align: right;
	padding: 6px 5px;
	border: solid 1px black;
}
.tableStyle .button
{
	margin: 2px 0px 0px 2px;
	float: left;
}

text{border:1px solid #aecaf0;}

    </style>
</head>
<body>
    @using (Html.BeginForm("AllowanceFileSave", "AllowanceFileManage", FormMethod.Post, new { id = "form1" }))
    {
 @Html.DevExpress().Menu(settings =>
{
    settings.Name = "toolBarMenu";
    settings.ItemAutoWidth = false;
    settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
    settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
    settings.Items.Add(item =>
    {
        item.Name = "btnSubmit";
        item.Text = "发送";
        item.Image.Url = Url.Content("~/Content/ControlImages/edit_add.png");
    });
    settings.Items.Add(item =>
    {
        item.Name = "btnback";
        item.Text = "返回";
        item.Image.Url = Url.Content("~/Content/ControlImages/back.png");
    });
    settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
    settings.ItemLinkMode = ItemLinkMode.ContentBounds;
}).GetHtml()
    <div>
    <table width="100%">
    <tr>
    <td align="center" valign="middle">
    <h1>@ViewData["FYear"]年度第<input type="text" style=" width:25px; vertical-align:middle" id="FPeriod" name='FPeriod' value="@ViewData["FPeriod"]" />批 @ViewData["FIssueNo"]汇总表</h1>
    </td>
    </tr>
    </table>
    <table class="tableStyle">
    <tr>
    <td class="tdClass" style=" width:10%" align="center">操作</td>
    <td class="tdClass" style=" width:40%" align="center">纳税人名称</td>
    <td class="tdClass" style=" width:15%" align="center">金额(万元)</td>
    <td class="tdClass" style=" width:45%" align="center">备注</td>
    </tr>
   @if (ViewData["showdata"] != null)
   {

       foreach (System.Data.DataRow dr in (ViewData["showdata"] as System.Data.DataTable).Rows)
       {
           z++;
           <tr id="@dr["NSRDZDAH"]">
           @if (dr["cz"] == "mx")
           {
                @Html.Hidden("hidNSRDZDAH", dr["NSRDZDAH"])
                <td class="tdClass" align="center"><a href="#" onclick="delADD('@dr["NSRDZDAH"]')">删除</a></td>
                <td class="tdClass" align="left">@dr["NSRMC"]</td>
                <td class="tdClass" align="right" id='@dr["NSRDZDAH"]je'>@dr["je"]</td>
               @Html.Hidden("hid" + @dr["NSRDZDAH"] + "je", dr["je"])
               if (dr.Table.Columns.Contains("FNote"))
               {
                   <td class="tdClass" align="center"><input type="text" style=" width:250px" id="@dr["NSRDZDAH"]FNote" name='@dr["NSRDZDAH"]FNote' value="@dr["FNote"]" /></td>
               }
               else
               {
                   <td class="tdClass" align="center"><input type="text" style=" width:250px" id="@dr["NSRDZDAH"]FNote" name='@dr["NSRDZDAH"]FNote' /></td>
               }
           }
           else
           {
                <td class="tdClass" align="center" colspan="2">@dr["cz"]</td>
                <td class="tdClass" align="right" id='jeSUM'>@dr["je"]</td>
                <td class="tdClass" align="center"></td>
           }
               
           </tr>
       }
   }
    </table>

            @Html.Hidden("hdjsAlert", (ViewData["jsAlert"]))
             @Html.Hidden("hidFAllowanceFileID", (ViewData["FAllowanceFileID"]))
             
            @Html.Hidden("hidtitle", ViewData["FYear"] + "年度第{0}批" + ViewData["FIssueNo"] + "汇总表")
            @Html.Hidden("hidFFinancePropNo", ViewData["FFinancePropNo"])
            @Html.Hidden("hidIssueIDList", ViewData["IssueIDList"])
             
    </div>
    }
</body>
</html>
